#!/bin/sh
set -x
# TODO autocreate settings.xml

if [ -z "$MAVEN_HOME" ]; then
	echo "MAVEN_HOME not set" 1>&2
	exit 1
fi

if [ ! -x "$MAVEN_HOME/bin/mvn" ]; then
	echo "'$MAVEN_HOME/bin/mvn' not executable" 1>&2
	exit 1
fi


exec "$MAVEN_HOME/bin/mvn" ${MAVEN_SETTINGS_FILE:+-s $MAVEN_SETTINGS_FILE} "${@}"

